home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
HyperLib 1997 Winter - Disc 1
/
HYPERLIB-1997-Winter-CD1.ISO.7z
/
HYPERLIB-1997-Winter-CD1.ISO
/
オンラインウェア
/
UTIL
/
Alpha 6.5.sit
/
Tcl
/
UserCode
/
selectFunc.tcl
< prev
next >
Wrap
Text File
|
1996-08-15
|
1KB
|
51 lines
# FILE: selectFunc.tcl
#
# LAST UPDATE: 2/1/93 12:15:28 PM
#
# selectFunc - similar to searchFunc, but selects the entire definition
# COPYRIGHT:
#
# Copyright ゥ 1993 by David C. Black
# All rights reserved.
#
# Redistribution and use in source and binary forms are permitted
# provided that the above copyright notice and this paragraph are
# duplicated in all such forms and that any documentation,
# advertising materials, and other materials related to such
# distribution and use acknowledge that the software was developed
# by David C. Black.
#
# THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
#
#############################################################################
proc selectFunc {dir} {
global funcExpr
set pos [getPos]
select $pos
if {$dir==1} {
incr pos
} else {
set pos [expr $pos-1]
}
if {[catch {eval select [search -f $dir -i 1 -r 1 $funcExpr $pos]}]} {
beep
message "No more functions"
} else {
set pos [getPos]
set end [selEnd]
if {[catch {eval select [search -f 1 -i 1 -r 1 $funcExpr $end]}]} {
select $pos [maxPos]
} else {
set end [getPos]
select $pos $end
}
}
}
#endproc selectFunc
##############################################################################